home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / CommResources.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  112 lines

  1. {
  2.      File:        CommResources.p
  3.  
  4.      Contains:    Communications Toolbox Resource Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT CommResources;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __COMMRESOURCES__}
  28. {$SETC __COMMRESOURCES__ := 1}
  29.  
  30. {$I+}
  31. {$SETC CommResourcesIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __OSUTILS__}
  35. {$I OSUtils.p}
  36. {$ENDC}
  37.  
  38. {$PUSH}
  39. {$ALIGN MAC68K}
  40. {$LibExport+}
  41.  
  42. {$IFC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED }
  43.  
  44. CONST
  45.                                                                 {     tool classes (also the tool file types)     }
  46.     classCM                        = 'cbnd';
  47.     classFT                        = 'fbnd';
  48.     classTM                        = 'tbnd';
  49.  
  50.                                                                 {     version of the Comm Resource Manager     }
  51.     curCRMVersion                = 2;                            {  constants general to the use of the Communications Resource Manager  }
  52.     crmType                        = 9;                            {  queue type     }
  53.     crmRecVersion                = 1;                            {  version of queue structure  }
  54.                                                                 {     error codes  }
  55.     crmGenericError                = -1;
  56.     crmNoErr                    = 0;
  57.  
  58. {  data structures general to the use of the Communications Resource Manager  }
  59.  
  60. TYPE
  61.     CRMErr                                = OSErr;
  62.     CRMRecPtr = ^CRMRec;
  63.     CRMRec = RECORD
  64.         qLink:                    QElemPtr;                                { reserved }
  65.         qType:                    INTEGER;                                { queue type -- ORD(crmType) = 9 }
  66.         crmVersion:                INTEGER;                                { version of queue element data structure }
  67.         crmPrivate:                LONGINT;                                { reserved }
  68.         crmReserved:            INTEGER;                                { reserved }
  69.         crmDeviceType:            LONGINT;                                { type of device, assigned by DTS }
  70.         crmDeviceID:            LONGINT;                                { device ID; assigned when CRMInstall is called }
  71.         crmAttributes:            LONGINT;                                { pointer to attribute block }
  72.         crmStatus:                LONGINT;                                { status variable - device specific }
  73.         crmRefCon:                LONGINT;                                { for device private use }
  74.     END;
  75.  
  76. FUNCTION InitCRM: CRMErr;
  77. FUNCTION CRMGetHeader: QHdrPtr;
  78. PROCEDURE CRMInstall(crmReqPtr: CRMRecPtr);
  79. FUNCTION CRMRemove(crmReqPtr: CRMRecPtr): OSErr;
  80. FUNCTION CRMSearch(crmReqPtr: CRMRecPtr): CRMRecPtr;
  81. FUNCTION CRMGetCRMVersion: INTEGER;
  82. FUNCTION CRMGetResource(theType: ResType; theID: INTEGER): Handle;
  83. FUNCTION CRMGet1Resource(theType: ResType; theID: INTEGER): Handle;
  84. FUNCTION CRMGetIndResource(theType: ResType; index: INTEGER): Handle;
  85. FUNCTION CRMGet1IndResource(theType: ResType; index: INTEGER): Handle;
  86. FUNCTION CRMGetNamedResource(theType: ResType; name: Str255): Handle;
  87. FUNCTION CRMGet1NamedResource(theType: ResType; name: Str255): Handle;
  88. PROCEDURE CRMReleaseResource(theHandle: Handle);
  89. FUNCTION CRMGetToolResource(procID: INTEGER; theType: ResType; theID: INTEGER): Handle;
  90. FUNCTION CRMGetToolNamedResource(procID: INTEGER; theType: ResType; name: Str255): Handle;
  91. PROCEDURE CRMReleaseToolResource(procID: INTEGER; theHandle: Handle);
  92. FUNCTION CRMGetIndex(theHandle: Handle): LONGINT;
  93. FUNCTION CRMLocalToRealID(bundleType: ResType; toolID: INTEGER; theType: ResType; localID: INTEGER): INTEGER;
  94. FUNCTION CRMRealToLocalID(bundleType: ResType; toolID: INTEGER; theType: ResType; realID: INTEGER): INTEGER;
  95. FUNCTION CRMGetIndToolName(bundleType: OSType; index: INTEGER; VAR toolName: Str255): OSErr;
  96. FUNCTION CRMFindCommunications(VAR vRefNum: INTEGER; VAR dirID: LONGINT): OSErr;
  97. FUNCTION CRMIsDriverOpen(driverName: Str255): BOOLEAN;
  98. FUNCTION CRMParseCAPSResource(theHandle: Handle; selector: ResType; VAR value: LONGINT): CRMErr;
  99. FUNCTION CRMReserveRF(refNum: INTEGER): OSErr;
  100. FUNCTION CRMReleaseRF(refNum: INTEGER): OSErr;
  101. {$ENDC}
  102. {$ALIGN RESET}
  103. {$POP}
  104.  
  105. {$SETC UsingIncludes := CommResourcesIncludes}
  106.  
  107. {$ENDC} {__COMMRESOURCES__}
  108.  
  109. {$IFC NOT UsingIncludes}
  110.  END.
  111. {$ENDC}
  112.